﻿<%@ Page Title="月份统计" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="True"
    CodeBehind="MonthStatistics.aspx.cs" Inherits="Hospital_MothStatistics" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="../Common/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="tabcontent2">
        <uc1:QueryControl ID="QueryControl1" runat="server" />
    </div>
    <div>
        <asp:GridView ID="gvwInfo" runat="server" AutoGenerateColumns="false" CssClass="mainlist"
            DataKeyNames="PurchaseTimeMonth" OnRowCommand="gvwInfo_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                <asp:BoundField HeaderText="月份" DataField="PurchaseTimeMonth" />
                <%--                <asp:BoundField HeaderText="采购总量" DataField="PurchaseCountTotal" />--%>
                <asp:BoundField HeaderText="采购金额" DataField="PurchaseAmountTotal" DataFormatString="{0:N2}" />
                <asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送金额" DataFormatString="{0:N2}" />
                <asp:BoundField DataField="DistributeRate" HeaderText="配送率" DataFormatString="{0:P2}" NullDisplayText="NA" />
                <%--        <asp:BoundField HeaderText="入库总量" DataField="PurchaseAmountTotal" />--%>
                <asp:BoundField HeaderText="入库金额" DataField="WareHouseAmountTotal" DataFormatString="{0:N2}" />
                <asp:BoundField DataField="WareHouseRate" HeaderText="入库率" DataFormatString="{0:P2}" NullDisplayText="NA" />
                <asp:TemplateField HeaderText="详情">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkHospital" runat="server" Text="医院详情统计" CommandName="Hospital"
                            CommandArgument='<%#Eval("PurchaseTimeMonth")%>'></asp:LinkButton>
                        <asp:LinkButton ID="LinkCompany" runat="server" Text="企业详情统计" CommandName="Company"
                            CommandArgument='<%#Eval("PurchaseTimeMonth")%>'></asp:LinkButton>
                        <asp:LinkButton ID="LinkDrugs" runat="server" Text="药品详情统计" CommandName="Drugs" CommandArgument='<%#Eval("PurchaseTimeMonth")%>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="其它">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlOther" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlOther_SelectedIndexChanged"
                            DataSourceID="XmlDataSource1" DataTextField="Name" DataValueField="Id">
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged1">
        </webdiyer:AspNetPager>
    </div>
    统计：<asp:Label ID="lblCount" runat="server"></asp:Label>
    <div class="listip">
    
        <ul>
            <asp:LinkButton ID="lbtnSee" runat="server" OnClick="lbtnSee_Click" Font-Size="Small" Visible="false">显示图表</asp:LinkButton>
            <uc2:ChartControl ID="ChartControl1" runat="server" Visible="false" />
            <li>说明:<span>可以点击相应按钮进入查看详细信息</span></li>
        </ul>
    </div>
</asp:Content>
